<?php
/**
 * <https://y.st./>
 * Copyright © 2018 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'It works!',
	'<{body}>' => <<<END
<section id="dreams">
	<h2>Dream journal</h2>
	<p>
		I dreamed my parents were playing a board game with my eldest two siblings, and they were making a mess.
		I started cleaning up after them, including putting away a second board game they&apos;d left out.
		My father stopped me, as apparently, the second board game was still in use.
		They&apos;d started that game first, but put it on hold to play the one they were playing now.
	</p>
</section>
<section id="meta">
	<h2>Website clean-up</h2>
	<p>
		The transition to a templated system has been a success!
		I wasn&apos;t able to remove the entire second closure today as planned yesterday, but everything is in working order and is much cleaner than before.
		However, the original plan to go through each page file and clean it ended up not happening.
		I thought the entire transition would require hand-editing the files, at which point I&apos;d clean them of every mess I noticed them containing.
		However, I was able to transition the pages to the new format in an almost-automated fashion, in batches of a little over ninety pages at a time.
		As such, I didn&apos;t actually go through the files, so I didn&apos;t end up cleaning them.
		That&apos;ll need to be done next time I do major editing in them.
	</p>
	<p>
		With this main code cleaned up like this, I think my virtual setup is ready for the coming term.
		Some mess still persists in my virtual workspace, but nothing in the areas I&apos;ll be needing for school.
		I&apos;ve got a date-related feature I&apos;d like to add that allows the insertion of a journal page&apos;s date within the body of the entry, but that can wait until another day.
		With the new setup, such a feature will be much less daunting to implement than it was when I first noticed a need for it.
	</p>
	<p>
		I tried to set up automatic validation of page code output, but the $a[WHATWG] had to go and mess up the <code>&lt;!DOCTYPE&gt;</code> declaration for $a[HTML]5.
		I knew removing all useful information from the <code>&lt;!DOCTYPE&gt;</code> declaration was a <strong>*terrible*</strong> idea, even when I first read about it.
		But now, because of that lack of information, the $a[PHP] $a[DOM] module can&apos;t figure out what kind of document it is and complains that the <code>&lt;html/&gt;</code> element can&apos;t be used because it&apos;s undefined.
		On the topic of $a[XHTML] and validation, it seems the $a[W3C] has released the next version of $a[XHTML]: <a href="https://www.w3.org/TR/html52/">$a[XHTML] 5.2</a>, so the footer on my pages has been updated to reflect this.
		I tried to find an official schema to validate against, as $a[PHP]s $a[DOM] module can validate markup that way too if I can find the scheme file, but I couldn&apos;t find one anywhere.
		What I did find was <a href="http://lists.xml.org/archives/xml-dev/201611/msg00067.html">this</a>:
	</p>
	<blockquote cite="http://lists.xml.org/archives/xml-dev/201611/msg00067.html">
		<p>
			I&apos;m aware that WHATWG and W3C have since long moved away from SGML (and XML in most web-related specification work), treating it as a legacy technique and with a somewhat presumptuous attitude in the specification text and elsewhere.
			But as the analysis of HTML5&apos;s grammar shows, they&apos;ve essentially abandoned use of any formal methods alltogether (and it shows in at least two flaws discussed in the analysis).
		</p>
	</blockquote>
	<p>
		Lovely.
		From the sounds of it, the $a[WHATWG] (and according to this author, the $a[W3C]) has decided specifications don&apos;t need to be formalised with any sort of machine-readable grammar specification.
		(In reality, the $a[W3C] only joined in on the $a[WHATWG]&apos;s plan because the $a[W3C] would&apos;ve lost all influence on $a[XHTML]/$a[HTML] otherwise.
		The $a[W3C]&apos;s participation is not a sign that they agree with the $a[WHATWG], and the $a[WHATWG]&apos;s plans seem to be almost exactly the opposite of the direction the $a[W3C] wanted to take the Web.)
		That means there&apos;s no way to validate $a[XHTML]5 documents without an $a[XHTML]5-specific validation tool.
		No generic tool will do a complete and accurate job.
		This is a huge part of why standards matter, and the $a[WHATWG] have really trashed an important Web standard.
	</p>
</section>
<section id="cleaning">
	<h2>Apartment cleaning</h2>
	<p>
		With my virtual space cleaned, it&apos;s now time to get back to cleaning my physical space.
		My main work for the day was moving furniture and planning the moving of more.
		I removed the coffee table from my bedroom.
		It was I think the first piece of furniture I brought in, but it&apos;s in terrible shape.
		Someone had been throwing it out and I scooped it up.
		I also moved a different table in to use in its place.
		It&apos;s got more space on it and it looks a lot nicer.
		I&apos;ll probably get rid of the first table once I&apos;ve moved things around a bit more.
	</p>
</section>
<section id="Wi-Fi">
	<h2>Wi-Fi card</h2>
	<p>
		The new (er, used) Wi-Fi card arrived in the mail today.
		I didn&apos;t get a chance to try it before work, but it was the first thing I did when I got back home.
		The suspense was killing me.
		The most-likely scenario in my mind was that the card wouldn&apos;t work on my running system, but that it&apos;d be completely usable from the live system.
		My reasoning was that the installer probably wouldn&apos;t have installed the firmware for it, as it wasn&apos;t needed at the time of installation.
		If this was indeed what came to pass, I should be able to switch back to my faulty Wi-Fi card to have Internet service at all, then use it both to look up how to install the firmware from the <code>main</code> Debian repo and to perform the actual installation itself.
		A nagging fear in my mind said the card wouldn&apos;t work at all, on the installed system or on the live system, but that fear was mostly held back by thoughts that the Debian wiki wouldn&apos;t lie to me.
		When I installed the card and booted the system, I was pretty sure I saw a message flash by about Atheros firmware that failed to load.
		I figured this was exactly what I&apos;d imagined happening coming to pass, that the firmware was missing on my specific machine, but that I&apos;d find it in the installer/live system where I needed in most.
		Instead, once I was logged in, I found the Wi-Fi working just fine.
		It&apos;s not even a struggle to remain connected any more!
		Before I headed into work, I was beating my head against the wall trying to get connected just long enough to even send an email ... it was painful.
		Now, I seem to stay connected just fine, and I didn&apos;t even have to instruct the machine to connect in the first place; it just chose a network from the list of one&apos;s I&apos;ve instructed it to connect to automatically.
	</p>
	<p>
		I need more of these cards.
		There&apos;s no time tonight, but I need to go back and buy a few more from that seller; I think I recall they had several.
	</p>
</section>
<section id="laptop">
	<h2>To Eugene again ...</h2>
	<p>
		I was sort of considering heading to Eugene tomorrow to try my hand at getting a working laptop again, even before the Wi-Fi card arrived.
		I&apos;ve rested a bit; I&apos;m running out of time before school starts; and I have the day off tomorrow, so I can make the trip at my own pace.
		The fact that the Wi-Fi card arrived though means I&apos;ll definitely be going.
		I needed rest, but the Wi-Fi card was my actual excuse to put the trip off.
	</p>
	<p>
		I should go about this more strategically than before; I should bring supplies and test the laptop before leaving the city to return home.
		At a minimum, I should bring a screwdriver, the large Wi-Fi card, one of the small Wi-Fi cards, and the $a[USB] drive with the live system on it.
		I need to use the live system to test the Wi-Fi, which almost certainly wont work, then swap in one of the Wi-Fi cards I brought and test again.
		I won&apos;t do a full system install until I get home, so there could still be problems like with that first of the two recent laptops, but I should be able to rule out the most likely problems right then and there.
		Lastly, I should remember not to buy a Hewlett-Packard machine, under any circumstances.
	</p>
</section>
END
);
